package com.lin.util;

import java.util.Random;

/**
 * @ClassName RandomID
 * @Description 刷新一个随机ID
 * @Author LinZePeng
 * @Date 2021/5/2 17:16
 * @Version 1.0
 */
public class RandomID {
	/**
	 * @Description 长度为10000000
	 */
	private static final int NUM_OF = 10000000;
	private static final Random RAND = new Random(NUM_OF);

	/**
	 * @Description 得到一个随机数ID转化为String
	 * @Param [] 不用传参
	 * @return java.lang.String
	 */
	public static String getRandomID(){
		return String.valueOf(RAND.nextInt(NUM_OF)+1);
	}
}
